// const a:string="ab"
const arr1:string[]=["ad","db","aaab","baa","baaab"]
// console.log(words);

let num=0

arr1.forEach((item:string,index:number)=>{
    if(item.includes("a"||"b")){
        num++
    }
})
console.log(num);

let Arr2:string[]=["a","b","c","ab","abc","bc"]
let num2=0
Arr2.forEach((item:string,index:number)=>{
    if(item.includes("a"||"b"||"c")){
        // console.log(item);
        num2++
    }
})
console.log(num2);

let Arr3:string[]=["cc","acd","b","ba","bac","bc"]
let num3=0
Arr3.forEach((item:string,index:number)=>{
    if(item=="cc"||"acd"||"ac"){
        // console.log(item);
        // console.log(item);
        
        num3++
    }
})
console.log(num3);

const result={
    a:"1",
    b:"2",
    c:"3",
    d:true
}


const allowed: string = 'cad'
const words: string[] = ['cc', 'acd', 'b', 'ba', 'bac', 'bad', 'ac', 'd']
function ConstNum(allowed: string, words: string[]): number {
    let num: number = 0
    let arr: string[] = []
    for (let index = 0; index < allowed.length; index++) {
        console.log(words.filter((item, i) => {
            return item.includes(allowed[index])
        }))
    }
    return num
}
console.log(ConstNum(allowed, words));



